

// 导出路由文件
export const routes = [
  {
    path: "/",
    name: "Login",
    component: () => import("@/views/login/Login.vue"),
  },
  {
    path: "/home",
    name: "Home",
    component: () => import("@/views/Home.vue"),
    // 二级路由
    children:[
      // 实时监控
      {
       path:'/home/monitoring',
       name:"Monitoring",
       component:()=>import('../views/monitoring/Monitoring.vue')
      },
    //  数据报表
    {
      path:'/home/yield',
      name:"Yield",
      component:()=>import('../views/survey/Yield.vue'),
      // 三级路由
      children:[
        {
          path:"/home/yield/entrepot",
          name:"Entrepot",
          component:()=>import('../views/survey/statement/Entrepot.vue'),
        },
        {
          path:"/home/yield/anomaly",
          name:"Anomaly",
          component:()=>import('../views/survey/statement/Anomaly.vue'),
        },
        {
          path:"/home/yield/batch",
          name:"Batch",
          component:()=>import('../views/survey/statement/Batch.vue'),
        },
        {
          path:"/home/yield/efficiency",
          name:"Efficiency",
          component:()=>import('../views/survey/statement/Efficiency.vue'),
        },
        {
          path:"/home/yield/plan",
          name:"Plan",
          component:()=>import('../views/survey/statement/Plan.vue'),
        },
        {
          path:"/home/yield/scrap",
          name:"Scrap",
          component:()=>import('../views/survey/statement/Scrap.vue'),
        },
      ]
     },

      // 生产计划
      {
        path:'/home/calendar',
        name:"Calendar",
        component: () => import('../views/promote/Calendar.vue')

      },
      {
        path:'/home/arrange',
        name:"Arrange",
        component: () => import('../views/promote/Arrange.vue')

      },
      {
        path:'/home/details',
        name:"Details",
        component: () => import('../views/promote/Details.vue')
      },

    // 产品录入
    {
      path:'/home/product',
        name:"Product",
        component: () => import('../views/scan/Product.vue')
    },
    {
      path:'/home/entering',
        name:"Entering",
        component: () => import('../views/scan/Entering.vue')
    },
    {
      path:'/home/detailed',
        name:"Detailed",
        component: () => import('../views/scan/Detailed.vue')
    },


      // 用户管理
      {
        path:"/home/user",
        name:'User',
        component:()=> import("../views/user/User.vue")
      },
      {
        path:"/home/rights",
        name:'Rights',
        component:()=> import("../views/user/Rights.vue")
      },
    ]
  },
 
  {
    path: '*',
    // 网址不对时的路径
    component: () => import('../views/Error404.vue')
  }
  
];
